<script setup lang="ts">
const token = localStorage.getItem('token')
const email = localStorage.getItem('user')

function b() {
  if (token == null || email == null) {
    location.reload()
    window.open('/login', '_self')
  }
  else {
    if (email == 'admin') {
      location.reload()
      window.open('/admin', '_self')

    } else {
      location.reload()
      window.open('/home', '_self')

    }
  }
}
b()
</script>

<template>
  <div></div>
</template>

<style scoped>

</style>